{% load i18n %}
<div id="comment-form">
    <h4>Post a comment</h4>
    <form method="post">{% csrf_token %}
        {% if next %}<div><input type="hidden" name="next" value="{{ next }}" /></div>{% endif %}
        {% for field in form %}
            {% if field.is_hidden %}<div>{{ field }}</div>{% endif %}
        {% endfor %}
        <div class="container">
            <div class="row">
                <div class="span3">
                    <div class="control-group {% if form.name.errors %}error{% endif %}">
                        <label class="control-label">{{ form.name.label_tag }}</label>
                        <div class="controls">
                            {{ form.name }}
                            <span class="help-block">{{ form.name.errors }}</span>
                        </div>
                    </div>
                </div>

                <div class="span3">
                    <div class="control-group {% if form.email.errors %}error{% endif %}">
                        <label class="control-label">{{ form.email.label_tag }}</label>
                        <div class="controls">
                            {{ form.email }}
                            <span class="help-block">{{ form.email.errors }}</span>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="span10">
                    <div class="control-group {% if form.content.errors %}error{% endif %}">
                        <label class="control-label">{{ form.content.label_tag }}</label>
                        <div class="controls">
                            {{ form.content }}
                            <span class="help-block">{{ form.content.errors }}</span>
                        </div>
                    </div>
                </div>
            </div>

            <p>
                <div><input type="hidden" name="action" value="post_comment"></div>
                <input type="submit" name="post" class="btn btn-primary" value="Post comment" />
            </p>
        </div>
    </form>
</div>
